<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>发送邮件</title>
</head>
<body>
邮件:<input type="text" id="mail"> <input type="button" value="发送" onclick="sendMail();"/>
<script src="../js/jquery-3.3.1.js"></script>
<script src="../js/common/common.js"></script>
<script>
    function sendMail() {
        // js验证

        // 非空验证

        // 邮箱格式验证

        let v_param = {};
        v_param.mail = $("#mail").val();

        $.ajax({
            type:"post",
            url:config.SERVER_URL+"/members/sendMail",
            data:v_param,
            success:function (res) {
                if (res.code == config.SUCCESS) {
                    location.href = "mailok.html";
                } else {
                    alert(res.msg);
                }
            }
        })
    }
</script>
</body>
</html>